//
//  LYQLoginNationListViewController.m
//  ZCProject
//
//  Created by Zheng on 16/11/16.
//  Copyright © 2016年 Zheng. All rights reserved.
//

#import "LYQLoginNationListViewController.h"

@interface LYQLoginNationListViewController () <UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) NSMutableArray *indexArr;
@property (nonatomic, strong) NSMutableArray *nationArr;

@end

@implementation LYQLoginNationListViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.listTableView.delegate = self;
    self.listTableView.dataSource = self;
    
    [self loadIndexDataSource];
    
    [self loadNationDataSource];
}

#pragma mark - 加载数据
#pragma mark 国家区域数据源
- (void)loadNationDataSource {
    
    [NetRequest PostWithRequestStyle:NetRequestHostTypeStyleDefault withAPI:@"member/country.php" param:nil success:^(id response) {
        
    } error:^(NSError *error) {
        
    }];
    
}

#pragma mark 索引数据源
- (void)loadIndexDataSource {
    //索引数组
    _indexArr = [[NSMutableArray alloc] init] ;
    
    [_indexArr addObject:@"★"];
    
    for(char c = 'A'; c <= 'Z'; c++ ) {
        [_indexArr addObject:[NSString stringWithFormat:@"%c",c]];
    }
}

#pragma mark - tableview datasource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 6;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [[UITableViewCell alloc] init];
    return cell;
}

- (NSArray<NSString *> *)sectionIndexTitlesForTableView:(UITableView *)tableView {
    
    return _indexArr;
}

#pragma mark - 内存警告
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
